<?php
//mysql_connect("localhost","wanzai_mylibrary","881006");
mysql_connect("127.0.0.1","root","");
mysql_select_db("wanzai_mylibrary");
mysql_query('SET NAMES UTF8');
if($_REQUEST['key']!=null){
$sql=mysql_query("SELECT * FROM  `book` WHERE B_Name LIKE  '%".$_REQUEST['key']."%'");
}
	while($e=mysql_fetch_assoc($sql))
			$output[]=$e;
$code = json_encode($output);
//$code = preg_replace("#\\\u([0-9a-f]+)#ie", "iconv('UCS-2', 'UTF-8', pack('H4', '\\1'))",$code);
print($code);
mysql_close();
?>

